﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZLDC.Common.Estate;
using System.Data;
using ZLDC.Topo.Model.Estate;
using ZLDC.Topo.BLL.Estate;
using ZLDC.Common.BaseUser;

namespace ZLDC.Estate.PM
{
    public partial class EstateFlow : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {                      
            if (!IsPostBack)
            {
                int id = _Request.GetInt("id", 0);//盘源ID

                HousingInfo info = HousingBLL.p_housing_detail(id);

                if (info != null)
                {

                    fprice.Value = info.Totalprice.ToString();//最近总价

                    funitprice.Value = info.Leaseprice.ToString();//最近租价
                    fImportant.Value = info.Mark5.ToString();//重要备注;
                    string tradetype = info.TradeType.ToString();

                    if (tradetype == "1")
                    {
                        divRent.Visible = false;

                    }
                    else
                    {
                        divSale.Visible = false;

                    }
                    span_linkmantel.InnerHtml = info.LinkmanTel;//代理人电话
                    span_ownertel.InnerHtml = info.OwnerTel;//业主电话
                    span_owner.InnerHtml = info.Owner;//业主
                    span_linkman.InnerHtml = info.Linkman;//联系人
                    sBuildName.InnerHtml = info.Ename + info.BuildName;//栋阁名称
                    sRoomNo.InnerHtml = info.Mark1 + " 楼 " + info.RoomNo;//房间号
                }


                fdept.Value = _Utility.GetInfoBySession().m_sDeptName;
                fdeptId.Value = _Utility.GetInfoBySession().m_sDeptID;
                fUser.Value = _Utility.GetInfoBySession().m_sUserName;
                fUserId.Value = _Utility.GetInfoBySession().m_sUserID;

                ZLDC.Topo.BLL.Estate.SystemParamBLL.LoadParamType(followType, false, "跟进方式");
                //ZLDC.Topo.BLL.Estate.SystemParamBLL.LoadParamType(AlertScope, false, "提醒范围");
                //ZLDC.Topo.BLL.Estate.SystemParamBLL.LoadParamType(reason, false, "举报原因");
                //ZLDC.Topo.BLL.Estate.SystemParamBLL.LoadParamType(AlertType, false, "提醒类型");
                //ZLDC.Topo.BLL.Estate.SystemParamBLL.LoadParamType(advise, false, "建议处理");               
            }
        }
    }
}
